namespace Sirius.Mapper
{
    using System.Collections;
    using System.Collections.Generic;

    public class Query : IQuery
    {
        private readonly IDictionary<string, IParameter> parameters = new Dictionary<string, IParameter>();

        public Query(string query, ResultType resultType)
        {
            QueryString = query;
            ResultType = resultType;
        }

        public string QueryString
        {
            get; private set;
        }

        public ResultType ResultType
        {
            get;
            private set;
        }

        public IEnumerator<IParameter> GetEnumerator()
        {
            return parameters.Values.GetEnumerator();
        }

        IEnumerator IEnumerable.GetEnumerator()
        {
            return GetEnumerator();
        }
    }
}